package com.dai.spec.common.enums;

/**
 * 公告状态枚举
 */
public enum noticeStatus {
    OPEN("0", "正常"),
    CLOSE("2", "关闭");
    private String code;
    private String value;

    noticeStatus(String code, String value) {
        this.code = code;
        this.value = value;
    }

    public String getCode() {
        return code;
    }

    public String getValue() {
        return value;
    }

    public static String getValueByCode(String code) {
        for (noticeStatus noticeStatusEnum : noticeStatus.values()) {
            if (noticeStatusEnum.getCode().equals(code)) {
                return noticeStatusEnum.getValue();
            }
        }
        return null;
    }
}
